<?php
declare(strict_types=1);

namespace app\common\validate;

use think\Validate;

class Course extends Validate
{
    protected $rule = [
        'name' => 'require',
        'cate_id' => 'integer',
        'describe' => 'require',
//        'price' => 'float|egt:0',
        'cover_image' => 'require',
        'content' => 'require',
        'days'=>'require|egt:1'
    ];

    protected $message = [
        'name.require' => '课程名称必须',
        'cate_id.integer' => '分类必须',
        'describe.require' => '课程介绍必须',
//        'price.float' => '价格必须',
        'cover_image.require' => '封面图片必须',
        'content.require' => '内容必须',
        'days.require' => '有效天数必须',
        'days.egt' => '有效天数大于1天',
    ];
}
